<table class="table table-bordered" id="address-lists-table" data-toggle="datagrid" data-options="{
    tableWidth: '100%',
    height: '100%',
    gridTitle : '发货记录',
    showToolbar: true,
    toolbarItem: 'add,del',
    local: 'remote',
    dataUrl: '/admin/logistics/notes-list?logistics_id={{$logisticsId}}',
    linenumberAll: false,
    showLinenumber: false,
    showCheckboxcol: true,
    filterThead: false,
    inlineEditMult: false,
    showEditbtnscol: '操作',
    editUrl: '/admin/logistics/notes-edit?id={id}',
    editMode:{dialog:{id:'ygt-bjui-dialog','title':'编辑',width:600,height:600}},
    editCallback:editCallback,
    delUrl:'/admin/logistics/notes-delete',
    delPK: 'id',
    delConfirm: true,
}">
    <thead>
    <tr>
        <th data-options="{name:'id',width:50,align:'center',add:false,edit:false}">编号</th>
        <th data-options="{name:'logistics_sn',width:150,align:'center',add:false,edit:false}">运单号</th>
        <th data-options="{name:'customer_address',width:200,align:'center',add:false,edit:false}">地址</th>
        <th data-options="{name:'number',width:80,align:'center'}">数量</th>
        <th data-options="{name:'weight',width:80,align:'center'}">重量</th>
        <th data-options="{name:'freight',width:100,align:'center'}">运费/吨</th>
        <th data-options="{name:'finish_time',align:'center'}">预计到货时间</th>
        <th data-options="{name:'is_remind_finish',align:'center'}">到货提醒</th>
        <th data-options="{align:'center',render:renderFunc}">相关记录</th>
    </tr>
    </thead>
</table>
<script type="text/javascript">
    function renderFunc(value, data)
    {
        var invoice  = '<button type="button" class="btn btn-info" data-toggle="navtab" data-options="';
        invoice  += '{id:\'logistics-invoice-list-navtab\',title:\'开票列表\',fresh:true,';
        invoice  += 'url:\'/admin/logistics/invoice-list\',data:{notes_id:'+data.id+'}}';
        invoice  += '">开票列表</button>';
        var bill  = '<button type="button" class="btn btn-info" data-toggle="navtab" data-options="';
        bill  += '{id:\'logistics-bill-list-navtab\',title:\'付款列表\',fresh:true,';
        bill  += 'url:\'/admin/logistics/bill-list\',data:{notes_id:'+data.id+'}}';
        bill  += '">付款列表</button>';
        var html    = invoice+bill;
        return html;
    }
</script>